home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 51 / Amiga Format CD51 (2000-03-10)(Future Publishing)(GB)[!][issue 2000-04].iso / -serious- / programming / other / sx4amiga / readme.txt < prev    next >
Text File  |  2000-01-27  |  6KB  |  120 lines

  1. Introduction
  2.  
  3. SX4Amiga is a hard/software package for programming the SX series of microcontrollers 
  4. from Scenix. These controllers have a PIC compatible CPU and are designed to operate at 
  5. very high speeds ranging from 50 to 100MHz. Combined with their real RISC core these 
  6. processors reach speeds of 100Mips, making them the fastest microcontrollers in their 
  7. class. The SX chips are available in 50 and 100mhz version with either 18 or 28 pins. The 
  8. chips are called SX18AC, SX18AC100, SX28AC and SX28AC100.
  9.  
  10. Until recently, the only programmer available for these chips is the expensive commercial 
  11. SX-Key from Parallax. The software for this programmer is only available for Windows 
  12. and later Linux systems. Then there was Fluffy, a DIY programmer. This system was also 
  13. only available for PC.
  14.  
  15. And now, there is SX4Amiga. Only available for Amiga systems !
  16.  
  17.  
  18. SX4Amiga features:
  19.  
  20. -ISP programming adapter.
  21. -19K2 RS232 interface
  22. -2.5 mips microcontroller to handle timing sensitive low level protocol
  23. -tested with SX18/SX28 types, fabrication dates 9849/9830
  24.  
  25. Hardware
  26.  
  27. The programmer is built around a pic16c/f84 processor so you need access to an pic 
  28. programmer. Unfortunately it isn't possible to do without this processor because of the 
  29. VERY timing sensitive programming algorithm of the SX. Fortunately the rest of the 
  30. schematic is very simple. The processor is clocked by a 9.8304MHz crystal. This 
  31. frequency has been chosen because it can be divided by 512 giving a baud rate for the 
  32. serial interface of exactly 19200 bps.
  33. The programmer needs 2 voltages, a +5V VCC supply and an +12.5V VPP supply. In 
  34. my implementation of SX4Amiga these voltages are derived from an unstabilized 12V 
  35. mains adapter using an 78L12 and an 7805 but you can also derive them from other 
  36. sources. (you can by example, tap +5V from the board you are programming and use a 
  37. switched step-up regulator to create +12.7V, as is done in the real SX-Key) If you take a 
  38. look at the diode in the 78L12 circuit, you can see that it makes sure that +12.6 is 
  39. delivered at the emitter of T1. When T1 is turned on, the saturation voltage of 0.2V makes 
  40. that +12.4V is delivered at he SX OSC1 pin. The 100Ohms resistor in series with T1 is to 
  41. limit the curent flowing into OSC1 in case of a malfunction. I used mosfets for T2 and T3 
  42. because they don't need an extra resistor. If you can't get hold of these mosfet's or find 
  43. them too expensive, you can also use a bc547 with a 22Kohms resistor in the base 
  44. connection. The SX4Amiga programming adapter has 2 status led's. The red led will light 
  45. when the 12.4/12.5V programming voltage is active. The green led acts as a power/busy 
  46. led. This led will light when the porgrammer is on and it will dim or start to flicker when 
  47. there is communication with the Amiga.
  48.  
  49. Software
  50.  
  51. Included in the archive is a little shell-utility called (surprisingly) SX4Amiga. SX4Amiga 
  52. uses the serial.device (standard amiga serial port) to connect to the SX4Amiga hardware at 
  53. 19k2 baud. Other ports can be used by starting SX4Amiga with the following arguments:
  54.  
  55. SX4Amiga <device> <number>
  56.  
  57.  
  58. The procedure to program an SX chip is the following:
  59. 1)      start SX4Amiga in a shell.
  60. 2)      Choose 'L' and type in the path of the HEX file you want to program.
  61. 3)      Choose 'F' and enter the right Fuse and FuseX values
  62. 4)      Choose 'T' and enter the Erase/Write time in ms.
  63. 5)      Buffer,Fuse, FuseX and Timing must now show the right settings.
  64. 6)      Connect the programming adapter to the Amiga and the SX chip (If you haven't
  65.         already done so)
  66. 7)      Choose 'E' to erase the SX chip
  67. 8)      Choose 'W' to program the SX chip.
  68.  
  69. With the 'T' option you can change the programming times in ms. (Refer to the SX 
  70. datasheet for the right values.) At the time of writing there are 2 revisions of the SX 
  71. silicon; the old revision and the new revision (refer to www.scenix.com for an errata on 
  72. silicon revisions). The old revison has a programming time of 100ms, the new revision has 
  73. a programming time of 20ms. Note that these 2 revisons also differ in the Fuse/FuseX 
  74. layout, so take care! The default setting of SX4Amiga is 100ms, which is also the 
  75. maximum value.
  76.  
  77. The SX won't work if the FuseX bits 11:7 are trashed with the wrong values. To overcome
  78. this situation (if it might happen) option 'O' is added. This option will overwrite FuseX
  79. with the current entered values. (including bits 11:7) Note that this option also erases
  80. the rest of the chip !
  81.  
  82. Assembler
  83.  
  84. An assembler is not included in this project. Fortunately there is an excellent pic 
  85. compatible cross compiler available for the Amiga: Apic. If you donwload the SX manual 
  86. you will see that the SX uses other mnemonics than the PIC. They are however opcode 
  87. and function compatible with the PIC lookalikes. Use therefore normal pic mnemonics on 
  88. the Amiga. There are 3 instructions that you will need on the SX but which are not 
  89. available in the PIC:
  90.  
  91.         mode
  92.         ret
  93.         reti
  94.  
  95. To get around these problems the include file SX.inc replaces them with the instructions 
  96. bcf PCL,1 2 and 3. This are bit clear instructions on the program counter and must 
  97. therefore not be used in your program. The SX4Amiga programming tool replaces them 
  98. again with the proper opcodes for mode, ret and reti again. Included in the archive is a
  99. example program that flashes led's connected to RA,RB and RC. Study this to get started.
  100.  
  101. Hints&Tips
  102.  
  103. The SX chips are still very new and a little beta. If you have bought an SX, write down
  104. the date/type stamp and look it up at www.scenix.com. Some production dates have little
  105. errors. This can save you days of searching for a software bug while the hardware
  106. faulty ! Furthermore, there are quite some websites dedicated to the SX. These are often
  107. very helpfull.
  108.  
  109. Happy programming with the fastest MCU in the world !
  110.  
  111.  
  112. History
  113.  
  114. V0.90ß  ??-07-1999      First working version and my first program is running on SX
  115.  
  116. V0.93ß  24-12-1999      -Added Overwrite option to overwrite bits 11:7 of FuseX
  117.                         -Fixed a bug that always setted CF bit of FuseX to 1
  118.                         -Cleaned up the code.
  119.  
  120.